package com.hospital.service.publics.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hospital.service.project.model.vo.ProDetailUserVo;
import com.hospital.service.publics.entity.help.PubUserInfoHelp;
import enhance.plus.logic.LogicBaseServiceImpl;
import com.hospital.service.publics.entity.PubUserInfo;
import com.hospital.service.publics.mapper.PubUserInfoMapper;
import com.hospital.service.publics.service.PubUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* 用户信息表 接口
*
* @author xhl
* @created 2020-10-13 14:51:12
*/
@Service
public class PubUserInfoServiceImpl extends LogicBaseServiceImpl<PubUserInfoMapper, PubUserInfo> implements PubUserInfoService{

    @Autowired
    private PubUserInfoMapper pubUserInfoMapper;

    @Override
    public List<ProDetailUserVo> getProjectUser(String projectNumber) {

        return this.pubUserInfoMapper.getProjectUser(projectNumber);
    }

    @Override
    public PubUserInfo queryUser(String chargePerson) {
        QueryWrapper<PubUserInfo> query = PubUserInfoHelp.createQuery();
        query.eq(PubUserInfoHelp.userNumber, chargePerson);
        return this.getOne(query);
    }
}
